Skip to content

fix(renderer): refetch once before spawning orchestrator on open - #3042

Open
AllBeingsFuture wants to merge 1 commit into
AgentWrapper:mainfrom
AllBeingsFuture:ao/agent-orchestrator-27/fix-orch-open-ensure
Open

fix(renderer): refetch once before spawning orchestrator on open#3042
AllBeingsFuture wants to merge 1 commit into
AgentWrapper:mainfrom
AllBeingsFuture:ao/agent-orchestrator-27/fix-orch-open-ensure

Conversation

@AllBeingsFuture

Copy link
Copy Markdown

Problem

Clicking Orchestrator sometimes opened an empty conversation. History still lived on the live orchestrator; the UI had treated a stale empty workspace cache as “no orchestrator” and spawned a blank new one.

Fix

Shared openOrEnsureOrchestrator helper used by ShellTopbar, Sidebar, and CommandPalette:

  1. Prefer newestActiveOrchestrator / findProjectOrchestrator from the current cache
  2. If none → refetch workspaces once, recompute
  3. If still none → spawnOrchestrator(..., clean=false) only
  4. Never passes clean=true

Preserved

  • Restart / settings / restore_dialog clean=true paths
  • Kill / terminate / multi-project isolation / worker spawn
  • Backend ensure semantics (unchanged)

Residual risk

Tests

cd frontend && npm test -- --run \
  src/renderer/lib/open-orchestrator.test.ts \
  src/renderer/lib/spawn-orchestrator.test.ts \
  src/renderer/components/CommandPalette.test.tsx \
  src/renderer/components/ShellTopbar.test.tsx

Stale empty workspace cache made Open Orchestrator spawn a blank session
even when a live orchestrator already existed. Shared openOrEnsure path
reuses newest non-terminated orch from cache, refetches once if missing,
then spawns only with clean=false. clean=true restart/settings paths
unchanged.
@somewherelostt

Copy link
Copy Markdown
Collaborator

Thanks for contributing to Agent Orchestrator.

This PR is being picked up by the current external contributor on-call pair:

If someone is already working on this, please continue as usual.
The on-call pair is added for visibility, tracking, and support, not to take over the work.
If you need help with review, direction, reproduction, or next steps, please tag @illegalcall and @Pulkit7070 here.

For faster context or live questions, you can also join the AO Discord.

Join the session here:
https://discord.gg/H6ZDcUXmq

Come by if you want to see what is being built, ask questions, or just hang around with the community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants